package com.skyhigh.web.webservice.domain;

// Generated 26/03/2012 11:56:15 PM by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.hibernate.annotations.Proxy;

/**
 * ContenidoFactura generated by hbm2java
 */
@Entity
@Table(name = "contenidoFactura", catalog = "proyecto_metodologia")
@TableGenerator(name="generatorName", 
table="secuencia",  
pkColumnName="codigo",  
pkColumnValue = "ContenidoFactura.id",
valueColumnName="valor",  
allocationSize=100)
@Proxy( lazy=false )
public class ContenidoFactura implements java.io.Serializable {

	private int idContenidoFactura;
	private Factura factura;
	private int idMercancia;
	private double costo;

	public ContenidoFactura() {
	}

	public ContenidoFactura(int idContenidoFactura, Factura factura,
			int idMercancia, double costo) {
		this.idContenidoFactura = idContenidoFactura;
		this.factura = factura;
		this.idMercancia = idMercancia;
		this.costo = costo;
	}

	@Id
	@Column(name = "idContenidoFactura", unique = true, nullable = false)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="generatorName")
	public int getIdContenidoFactura() {
		return this.idContenidoFactura;
	}

	public void setIdContenidoFactura(int idContenidoFactura) {
		this.idContenidoFactura = idContenidoFactura;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idFactura", nullable = false)
	public Factura getFactura() {
		return this.factura;
	}

	public void setFactura(Factura factura) {
		this.factura = factura;
	}

	@Column(name = "idMercancia", nullable = false)
	public int getIdMercancia() {
		return this.idMercancia;
	}

	public void setIdMercancia(int idMercancia) {
		this.idMercancia = idMercancia;
	}

	@Column(name = "costo", nullable = false, precision = 22, scale = 0)
	public double getCosto() {
		return this.costo;
	}

	public void setCosto(double costo) {
		this.costo = costo;
	}

}
